﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Aliphant.UI.Widgets;
using Aliphant.UI;
using System.Windows.Input;
using System.Windows.Controls;
using System.Windows;

namespace Aliphant.Widget.JS.Views
{
    public class WidgetContainer : BaseWidget, IWidget
    {
        public event Action? QuickEvent1;
        public event Action? QuickEvent2;
        public event Action? CloseEvent;

        public void Init(UI.Widget widget)
        {

        }

        public void SetScriptPath(string scriptPath)
        {

        }

        public void QuickAction1()
        {
            QuickEvent1?.Invoke();
        }

        public void QuickAction2()
        {
            QuickEvent2?.Invoke();
        }

        public void Close()
        {
            CloseEvent?.Invoke();
        }

        public string? QuickButton1Tip { get; set; } = string.Empty;

        public string? QuickButton2Tip { get; set; } = string.Empty;

        public string? QucikButton1Icon { get; set; } = string.Empty;

        public string? QucikButton2Icon { get; set; } = string.Empty;

        public override void DropWindow(object sender, MouseButtonEventArgs e)
        {
            if(e.OriginalSource == sender)
            base.DropWindow(sender, e);
        }

        public override void DropWindowOver(object sender, MouseButtonEventArgs e)
        {
            base.DropWindowOver(sender, e);
        }
    }
}
